import time
from cache import RedisCache
from tasks import getOne

cache = RedisCache()
while True:
    # 获取等待序列中的URL
    url = cache.getUrlWait()
    if url == None:
        print("[-]非需要",url)
        time.sleep(1)
        continue

    print("[*]新任务   {}".format(url))
    # 将URL进行任务投递
    getOne.delay(url)